package com.yfq.springframework.util;

/**
 * @author 姚凤桥
 * @date 2022/12/5 21:59
 * @description
 */
public class Assert {
    /**
     * 断言对象是否为空
     */
    public static void notNull(Object obj, String errorMsg) {
        if (obj == null) {
            throw new RuntimeException(errorMsg);
        } else if (obj instanceof String) {
            if (obj.equals("")) {
                throw new RuntimeException(errorMsg);
            }
        }
    }
}
